package com.cheejee.goodscenter.service;

import java.util.Date;

import javax.validation.constraints.NotNull;

import org.springframework.validation.annotation.Validated;

import com.cheejee.goodscenter.module.entity.SaleCount;
import com.github.pagehelper.Page;

/**
 * 
 * @author CARRY
 * @Date 2020年10月27日上午1:48:04
 */
@Validated
public interface SaleCountService {

	SaleCount querySaleById(@NotNull(message = "销售流水ID不能为空")Long id);
	
	/**
	 * 根据条件查询销售流水
	 *
	 * @param goodsId
	 * @param skuId
	 * @return
	 */
	Page<SaleCount> querySaleCount(Long goodsId, Long skuId, int pageNum, int pageSize);
	
	/**
	 * 查询时间段内的销售流水
	 *
	 * @param begin 开始时间
	 * @param end 结束时间
	 * @return
	 */
	Page<SaleCount> querySaleCountBetween(@NotNull(message = "开始时间不能为空")Date begin, @NotNull(message = "截至时间不能为空")Date end, Long goodsId, Long skuId, int pageNum, int pageSize);
	
	/**
	 * 新增销售流水
	 *
	 * @param salecount
	 * @return
	 */
	int addSaleCount(@NotNull(message = "新增销售流水不能为空")SaleCount salecount);
	
	int deleteSaleCount(@NotNull(message = "删除的销售流水不能为空")Long...id);
}
